Optimal. Leaf size=170 \[ -\frac{\sin ^4(c+d x) \left (a \left (-10 a^2 b^2+a^4+5 b^4\right ) \cot (c+d x)+b \left (-10 a^2 b^2+5 a^4+b^4\right )\right )}{4 d}+\frac{\sin ^2(c+d x) \left (5 a \left (a^2-3 b^2\right ) \left (a^2+b^2\right ) \cot (c+d x)+4 b \left (5 a^4-b^4\right )\right )}{8 d}+\frac{1}{8} a x \left (10 a^2 b^2+3 a^4+15 b^4\right )-\frac{b^5 \log (\sin (c+d x))}{d}+\frac{b^5 \log (\tan (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.221735, antiderivative size = 170, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {3088, 1805, 801, 635, 203, 260} \[ -\frac{\sin ^4(c+d x) \left (a \left (-10 a^2 b^2+a^4+5 b^4\right ) \cot (c+d x)+b \left (-10 a^2 b^2+5 a^4+b^4\right )\right )}{4 d}+\frac{\sin ^2(c+d x) \left (5 a \left (a^2-3 b^2\right ) \left (a^2+b^2\right ) \cot (c+d x)+4 b \left (5 a^4-b^4\right )\right )}{8 d}+\frac{1}{8} a x \left (10 a^2 b^2+3 a^4+15 b^4\right )-\frac{b^5 \log (\sin (c+d x))}{d}+\frac{b^5 \log (\tan (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3088
Rule 1805
Rule 801
Rule 635
Rule 203
Rule 260
Rubi steps
\begin{align*} \int \sec (c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{(b+a x)^5}{x \left (1+x^2\right )^3} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac{\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^4(c+d x)}{4 d}+\frac{\operatorname{Subst}\left (\int \frac{-4 b^5+a \left (a^4-10 a^2 b^2-15 b^4\right ) x-20 a^4 b x^2-4 a^5 x^3}{x \left (1+x^2\right )^2} \, dx,x,\cot (c+d x)\right )}{4 d}\\ &=\frac{\left (4 b \left (5 a^4-b^4\right )+5 a \left (a^2-3 b^2\right ) \left (a^2+b^2\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{8 d}-\frac{\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^4(c+d x)}{4 d}-\frac{\operatorname{Subst}\left (\int \frac{8 b^5+a \left (3 a^4+10 a^2 b^2+15 b^4\right ) x}{x \left (1+x^2\right )} \, dx,x,\cot (c+d x)\right )}{8 d}\\ &=\frac{\left (4 b \left (5 a^4-b^4\right )+5 a \left (a^2-3 b^2\right ) \left (a^2+b^2\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{8 d}-\frac{\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^4(c+d x)}{4 d}-\frac{\operatorname{Subst}\left (\int \left (\frac{8 b^5}{x}+\frac{3 a^5+10 a^3 b^2+15 a b^4-8 b^5 x}{1+x^2}\right ) \, dx,x,\cot (c+d x)\right )}{8 d}\\ &=\frac{b^5 \log (\tan (c+d x))}{d}+\frac{\left (4 b \left (5 a^4-b^4\right )+5 a \left (a^2-3 b^2\right ) \left (a^2+b^2\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{8 d}-\frac{\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^4(c+d x)}{4 d}-\frac{\operatorname{Subst}\left (\int \frac{3 a^5+10 a^3 b^2+15 a b^4-8 b^5 x}{1+x^2} \, dx,x,\cot (c+d x)\right )}{8 d}\\ &=\frac{b^5 \log (\tan (c+d x))}{d}+\frac{\left (4 b \left (5 a^4-b^4\right )+5 a \left (a^2-3 b^2\right ) \left (a^2+b^2\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{8 d}-\frac{\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^4(c+d x)}{4 d}+\frac{b^5 \operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,\cot (c+d x)\right )}{d}-\frac{\left (a \left (3 a^4+10 a^2 b^2+15 b^4\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\cot (c+d x)\right )}{8 d}\\ &=\frac{1}{8} a \left (3 a^4+10 a^2 b^2+15 b^4\right ) x-\frac{b^5 \log (\sin (c+d x))}{d}+\frac{b^5 \log (\tan (c+d x))}{d}+\frac{\left (4 b \left (5 a^4-b^4\right )+5 a \left (a^2-3 b^2\right ) \left (a^2+b^2\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{8 d}-\frac{\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^4(c+d x)}{4 d}\\ \end{align*}
Mathematica [B] time = 6.44127, size = 711, normalized size = 4.18 \[ \frac{b^5 \left (\frac{\cos ^4(c+d x) (a+b \tan (c+d x))^6 \left (a b \tan (c+d x)+b^2\right )}{4 b^6 \left (a^2+b^2\right )}-\frac{\frac{\cos ^2(c+d x) (a+b \tan (c+d x))^6 \left (b \left (a \left (2 b^2-3 a^2\right )+3 a b^2\right ) \tan (c+d x)-3 a^2 b^2+b^2 \left (2 b^2-3 a^2\right )\right )}{2 b^4 \left (a^2+b^2\right )}-\frac{\left (-29 a^2 b^2+5 a^2 \left (3 a^2-5 b^2\right )+3 a^4+8 b^4\right ) \left (\frac{1}{2} b^2 \left (10 a^2-b^2\right ) \tan ^2(c+d x)+5 a b \left (2 a^2-b^2\right ) \tan (c+d x)+\frac{1}{2} \left (-10 a^2 b^2+\frac{-10 a^3 b^2+a^5+5 a b^4}{\sqrt{-b^2}}+5 a^4+b^4\right ) \log \left (\sqrt{-b^2}-b \tan (c+d x)\right )+\frac{1}{2} \left (-10 a^2 b^2-\frac{-10 a^3 b^2+a^5+5 a b^4}{\sqrt{-b^2}}+5 a^4+b^4\right ) \log \left (\sqrt{-b^2}+b \tan (c+d x)\right )+\frac{5}{3} a b^3 \tan ^3(c+d x)+\frac{1}{4} b^4 \tan ^4(c+d x)\right )-5 a \left (3 a^2-5 b^2\right ) \left (\frac{1}{3} b^3 \left (15 a^2-b^2\right ) \tan ^3(c+d x)+a b^2 \left (10 a^2-3 b^2\right ) \tan ^2(c+d x)+b \left (-15 a^2 b^2+15 a^4+b^4\right ) \tan (c+d x)+\frac{1}{2} \left (-20 a^3 b^2+\frac{-15 a^4 b^2+15 a^2 b^4+a^6-b^6}{\sqrt{-b^2}}+6 a^5+6 a b^4\right ) \log \left (\sqrt{-b^2}-b \tan (c+d x)\right )+\frac{1}{2} \left (-20 a^3 b^2-\frac{-15 a^4 b^2+15 a^2 b^4+a^6-b^6}{\sqrt{-b^2}}+6 a^5+6 a b^4\right ) \log \left (\sqrt{-b^2}+b \tan (c+d x)\right )+\frac{3}{2} a b^4 \tan ^4(c+d x)+\frac{1}{5} b^5 \tan ^5(c+d x)\right )}{2 b^2 \left (a^2+b^2\right )}}{4 b^2 \left (a^2+b^2\right )}\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.236, size = 272, normalized size = 1.6 \begin{align*}{\frac{{a}^{5} \left ( \cos \left ( dx+c \right ) \right ) ^{3}\sin \left ( dx+c \right ) }{4\,d}}+{\frac{3\,{a}^{5}\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{8\,d}}+{\frac{3\,{a}^{5}x}{8}}+{\frac{3\,{a}^{5}c}{8\,d}}-{\frac{5\,{a}^{4} \left ( \cos \left ( dx+c \right ) \right ) ^{4}b}{4\,d}}-{\frac{5\,{a}^{3}{b}^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{3}\sin \left ( dx+c \right ) }{2\,d}}+{\frac{5\,{a}^{3}{b}^{2}\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{4\,d}}+{\frac{5\,{a}^{3}{b}^{2}x}{4}}+{\frac{5\,{a}^{3}{b}^{2}c}{4\,d}}+{\frac{5\,{a}^{2}{b}^{3} \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{2\,d}}-{\frac{5\,a{b}^{4}\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{4\,d}}-{\frac{15\,a{b}^{4}\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{8\,d}}+{\frac{15\,a{b}^{4}x}{8}}+{\frac{15\,a{b}^{4}c}{8\,d}}-{\frac{{b}^{5} \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{4\,d}}-{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{2}{b}^{5}}{2\,d}}-{\frac{{b}^{5}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.09662, size = 230, normalized size = 1.35 \begin{align*} \frac{80 \, a^{2} b^{3} \sin \left (d x + c\right )^{4} - 40 \,{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2} a^{4} b +{\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{5} + 10 \,{\left (4 \, d x + 4 \, c - \sin \left (4 \, d x + 4 \, c\right )\right )} a^{3} b^{2} + 5 \,{\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) - 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a b^{4} - 8 \,{\left (\sin \left (d x + c\right )^{4} + 2 \, \sin \left (d x + c\right )^{2} + 2 \, \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} b^{5}}{32 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.549745, size = 362, normalized size = 2.13 \begin{align*} -\frac{8 \, b^{5} \log \left (-\cos \left (d x + c\right )\right ) + 2 \,{\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{4} -{\left (3 \, a^{5} + 10 \, a^{3} b^{2} + 15 \, a b^{4}\right )} d x + 8 \,{\left (5 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{2} -{\left (2 \,{\left (a^{5} - 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} \cos \left (d x + c\right )^{3} +{\left (3 \, a^{5} + 10 \, a^{3} b^{2} - 25 \, a b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.25981, size = 269, normalized size = 1.58 \begin{align*} \frac{4 \, b^{5} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) +{\left (3 \, a^{5} + 10 \, a^{3} b^{2} + 15 \, a b^{4}\right )}{\left (d x + c\right )} - \frac{6 \, b^{5} \tan \left (d x + c\right )^{4} - 3 \, a^{5} \tan \left (d x + c\right )^{3} - 10 \, a^{3} b^{2} \tan \left (d x + c\right )^{3} + 25 \, a b^{4} \tan \left (d x + c\right )^{3} + 40 \, a^{2} b^{3} \tan \left (d x + c\right )^{2} + 4 \, b^{5} \tan \left (d x + c\right )^{2} - 5 \, a^{5} \tan \left (d x + c\right ) + 10 \, a^{3} b^{2} \tan \left (d x + c\right ) + 15 \, a b^{4} \tan \left (d x + c\right ) + 10 \, a^{4} b + 20 \, a^{2} b^{3}}{{\left (\tan \left (d x + c\right )^{2} + 1\right )}^{2}}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]